#include <stdio.h>
#include <stdlib.h>

int main()
{
    int ch;
    int line = 0;
    int at_begin = 1;
    while ((ch = getchar()) != EOF) {
        if (at_begin == 1) {
            at_begin = 0;
            line++;
            printf("%d ", line);
        }
        putchar(ch);
        if (ch == '\n') {
            at_begin = 1;
        }
    }
    return 0;
}